package com.lambda;

/**
 * Created by
 *  Runnable接口是一个函数式接口
 *  可以用lambda表达式来取代函数式接口的匿名内部类
 * @author touni
 * @date 2019/4/29
 * @time 10:15
 */
public class DemoRunnable {

    public static void threadRun(Runnable runnable){
        new Thread(runnable).start();
    }
    public static void main(String[] args) {
        threadRun(() -> System.out.println(Thread.currentThread().getName()+": 这个线程正在执行！！"));
    }




}
